#pragma once
#include "CycleQueue.h"
#include <string>
#include <vector>
#include <opencv2/opencv.hpp>

class DetectOutput {
public:
	DetectOutput() {};
	~DetectOutput() {};
public:
	std::vector<std::pair<cv::Rect, std::string>> result;
	unsigned int frameNo;
};

class CDetectOutputQueueManager
{
private:
	unsigned int m_size;
public:
	CDetectOutputQueueManager(unsigned size)
		:m_size(size) {
		images = new CCycleQueue<DetectOutput>(size);
	};
	~CDetectOutputQueueManager() {
		delete images;
	};
	void push(DetectOutput ele)
	{
		images->push(ele);
	}

	DetectOutput getAt(unsigned int i)
	{
		return images->getAt(i);
	}

	int getCurrentPos() {
		return images->getCurrentPos();
	}

	int getLast(DetectOutput &frame) {
		return images->getLast(frame);
	}


	int getSize() {
		return m_size;
	}
private:
	CCycleQueue<DetectOutput> *images;
};
